<?xml version="1.0" encoding="UTF-8" ?>
<%@page import="com.lianjing.sh.spring.web.controller.enhance.output.bean.OutputBean"%>
<%@page import="com.lianjing.sh.spring.web.controller.enhance.output.Util_OutputBean"%>
<%@page import="com.sh_lianjing.web.el.EL"%>
<%@page import="java.util.Collection"%>
<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<%-- S 数据 --%>
<c:set var="bean_data" value="${moduleBody.data}" />
<c:forEach items="${moduleBody.outputInfoGroups}" var="outputInfoGroup">
	<c:set var="way" value="${outputInfoGroup.way}" />
		
	<%-- S 普通数据 --%>
		<%-- 横排 --%>
		<c:if test="${way=='Horizontal'}">
		<div class="xxh_module_dataShowH">
		<c:forEach items='<%=Util_OutputBean.plan(EL.eval("${outputInfoGroup.outputInfos}", OutputBean[].class, pageContext))%>' var="outputInfo" >
			<c:set var="bean_name" value="${outputInfo.name}" />
			<c:set var="bean_value" value='<%=EL.eval("${bean_data."+pageContext.getAttribute("bean_name")+"}", pageContext)%>' />
			<c:set var="dataType" value="${outputInfo.dataType}"/>
			<c:set var="datePattern" value="${outputInfo.datePattern}"/>
			
			<span <c:if test="${outputInfo.display=='Hide'}">style='display:none;'</c:if> >
				<%-- 名 --%>
				<strong>${outputInfo.comment}：</strong>
				<%-- 值 --%>
				<c:if test='${dataType=="Enum"}' var="isEnum">
					${bean_value.comment}
				</c:if>
				<c:if test='${dataType=="Date"}' var="isDate">
					<fmt:formatDate value="${bean_value}" type="date" pattern="${datePattern}"/>
				</c:if>
				<c:if test='${dataType=="Img"}' var="isImg">
					<span style="width: 300px; height:300px;">
						<input com="myImg" initAfterAction="@fun:fileuploadShowConfig()" type="file" class="fileuploadPlus-show file-loading" show="${bean_value}"/>
					</span>
				</c:if>
				<c:if test='${!isDate && !isEnum && !isImg}' >
					${bean_value}
				</c:if>
			</span>
		</c:forEach>
	    </div>
		</c:if>
		
		<%-- 竖排 --%>
		<c:if test="${way=='Vertical'}">
		<div class="xxh_module_dataShowV">
		<c:forEach items='<%=Util_OutputBean.plan(EL.eval("${outputInfoGroup.outputInfos}", OutputBean[].class, pageContext))%>' var="outputInfo" >
			<c:set var="bean_name" value="${outputInfo.name}" />
			<c:set var="bean_value" value='<%=EL.eval("${bean_data."+pageContext.getAttribute("bean_name")+"}", pageContext)%>' />
			<c:set var="dataType" value="${outputInfo.dataType}"/>
			<c:set var="datePattern" value="${outputInfo.datePattern}"/>
			
	        <div <c:if test="${outputInfo.display=='Hide'}">style='display:none;'</c:if> class="col-lg-2 single">
	        	<%-- 名 --%>
	        	<label>${outputInfo.comment}：</label>
	        	 <%-- 值 --%>
	            <span>
					<c:if test='${dataType=="Enum"}' var="isEnum">
						${bean_value.comment}
					</c:if>
					<c:if test='${dataType=="Date"}' var="isDate">
						<fmt:formatDate value="${bean_value}" type="date" pattern="${datePattern}"/>
					</c:if>
					<c:if test='${dataType=="Img"}' var="isImg">
						<span style="width: 300px; height:300px;">
							<input com="myImg" initAfterAction="@fun:fileuploadShowConfig()" type="file" class="fileuploadPlus-show file-loading" show="${bean_value}"/>
						</span>
					</c:if>
					<c:if test='${!isDate && !isEnum && !isImg}' >
						${bean_value}
					</c:if>
				</span>
	        </div>
        </c:forEach>
	    </div>
		</c:if>
	<%-- E 普通数据 --%>
</c:forEach>                    
<%-- S 数据 --%>